<!--
 * @Author: your name
 * @Date: 2021-05-25 13:09:43
 * @LastEditTime: 2021-05-27 18:13:42
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \遵义\zunyi\src\views\user\user.vue
-->
<template>
  <div>
    <nav-bar></nav-bar>
    <!-- 表单 -->
    <el-form :model="from" :rules="rules" ref="from" label-width="100px">
      <el-form-item label="活动名称" prop="name">
        <!-- <el-input v-model="form.name"></el-input> -->
        <my-input v-model="from.name"></my-input>
      </el-form-item>
    </el-form>
  {{from.name}}    
  </div>
</template>

<script>
export default {
  data() {
    return {
      from: {
        name: "小明",
      },
      rules: {
        name: [
          { required: true, message: "请输入活动名称", trigger: "blur" },
          { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
        ],
      },
    };
  },
};
</script>

<style>
</style>